from core.basic.skill import 技能
from core.basic.character import Character
from core.basic.skill import 主动技能, 被动技能


class 剑魂主动技能(主动技能):
    hit数 = 0  # 太刀时所需参数，计算期望刺伤

    神剑术倍率 = 1.0

    def 额外刺伤层数(self, 武器类型):
        return 0

    def 穿云刺数量(self, 武器类型):
        return 0


class 剑魂流系技能(主动技能):
    hit数 = 0

    def 武器CD系数(self, 武器类型, 输出类型):
        return 1.0  # 流系列技能不受武器CD影响

    def 额外刺伤层数(self, 武器类型):
        return 0

    def 穿云刺数量(self, 武器类型):
        return 0


class 技能0(被动技能):
    名称 = '基础精通'
    倍率 = 1.0
    所在等级 = 1
    等级上限 = 200
    学习间隔 = 1
    等级精通 = 110
    关联技能 = ['里鬼剑术', '空中连斩']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(self.倍率 * (0.463 + 0.089 * self.等级), 5)


class 技能1(剑魂主动技能):
    名称 = '空中连斩'
    备注 = '单次伤害(太刀一次挥舞动作是两次伤害)'
    所在等级 = 5
    等级上限 = 11
    学习间隔 = 1
    等级精通 = 1

    # 实际的空中连斩第一次为跳跃攻击，后续才为空中连斩的伤害
    data0 = [int(i*(1/1.05)) for i in [0, 195, 209, 221, 234, 247, 260, 275, 286, 299, 312, 326, 340, 352, 365, 378, 391, 405, 417, 430, 443, 456, 470, 482, 495, 508, 521, 535, 547, 560, 573, 586, 600, 612,
                              625, 638, 651, 665, 677, 690, 703, 716, 730, 742, 755, 768, 781, 795, 807, 820, 833, 846, 860, 872, 885, 898, 911, 926, 937, 950, 963, 977, 991, 1003, 1016, 1029, 1042, 1056, 1068, 1081, 1094]]
    hit0 = 1
    CD = 1.0
    TP成长 = 0.1
    TP上限 = 5
    hit数 = 2
    太刀附加 = 0

    def 等效百分比(self, **argv):
        武器类型 = argv.get('武器类型', '光剑')
        char = argv.get('char', {})
        if 武器类型 != '太刀':
            self.hit0 = 1
        else:
            self.太刀附加 = char.get_skill_by_name('太刀精通').太刀附加(武器类型)
            self.hit0 = (self.data0[self.等级] - 100 +
                         self.太刀附加) / self.data0[self.等级] * 2 * 1.5
        return super().等效百分比(**argv)

    def 穿云刺数量(self, 武器类型):
        return 1


class 技能2(剑魂主动技能):
    名称 = '里鬼剑术'
    所在等级 = 15
    等级上限 = 11
    学习间隔 = 15
    等级精通 = 1
    MP = [6, 140]
    # data0 = [(1 + i / 1000) for i in [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330,
    #                                   360, 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, 750, 780, 810, 840, 870]]
    # 武器倍率 = {'短剑': 1004.68*1.085,
    #         '光剑': 890.19*1.085,
    #         '巨剑': 1241.95*1.085,
    #         '钝器': 1225.24*1.085,
    #         '太刀': 1197.49*1.085}

    data0 = [0]*12
    data = {
        '短剑': [0, 1092, 1123, 1156, 1189, 1222, 1254, 1288, 1319, 1353, 1385, 1419],
        '光剑': [0, 968, 994, 1024, 1052, 1082, 1112, 1140, 1170, 1196, 1226, 1256],
        '巨剑': [0, 1348, 1387, 1426, 1466, 1505, 1549, 1588, 1629, 1668, 1707, 1751],
        '钝器': [0, 1336, 1372, 1412, 1453, 1493, 1535, 1575, 1615, 1653, 1693, 1733],
        '太刀': [0, 1308, 1344, 1382, 1422, 1464, 1502, 1540, 1578, 1620, 1660, 1698]
    }
    # 巨剑不蓄力伤害下降
    CD = 1.0
    TP成长 = 0.1
    TP上限 = 5
    hit数 = 8

    穿云刺 = {'短剑': 3, '光剑': 3, '巨剑': 2, '钝器': 4, '太刀': 4}

    附加百分比 = 0

    def 武器百分比修正(self, 武器类型):
        # 国服特色回收
        return self.武器倍率.get(武器类型, 1.0)/1.05

    def 等效百分比(self, **argv):
        武器类型 = argv.get('武器类型', '光剑')
        self.data0 = self.data[武器类型]
        return super().等效百分比(**argv)

    # 里鬼附加伤害
    def 特殊技能加成(self, char, 武器类型):
        self.附加百分比 = 0
        self.hit1 = 0
        if 武器类型 == '巨剑':
            self.附加百分比 = char.get_skill_by_name('巨剑精通').里鬼附加百分比(武器类型)
            self.hit1 = 1
        if 武器类型 == '短剑':
            self.附加百分比 = char.get_skill_by_name('短剑精通').里鬼附加百分比(武器类型)
            self.hit1 = 3
        self.data1 = [0] + [self.附加百分比]*11

    def 穿云刺数量(self, 武器类型):
        return self.穿云刺[武器类型]


class 技能3(被动技能):
    名称 = '武器奥义'
    所在等级 = 15
    等级上限 = 30
    学习间隔 = 3
    等级精通 = 20
    关联技能 = ['无']


class 技能4(被动技能):
    名称 = '光剑掌握'
    所在等级 = 15
    等级上限 = 20
    学习间隔 = 3
    等级精通 = 10
    关联技能 = ['无']
    冷却关联技能 = ['所有']
    非冷却关联技能 = ['极鬼剑术暴风式', '万剑归宗', '万剑极诣开天斩']

    def CD缩减倍率(self, 武器类型):
        if self.等级 == 0 or 武器类型 != '光剑':
            return 1.0
        else:
            return round(1.0 - 0.01 * self.等级, 5)


class 技能5(被动技能):
    名称 = '短剑精通'
    所在等级 = 15
    等级上限 = 2
    学习间隔 = 3
    等级精通 = 1
    # 物理攻击力增加
    data1 = [0, 127, 142, 158, 173, 188, 203, 218, 233, 248, 263, 278, 293, 308, 323, 338, 353, 368, 383, 398, 413, 428, 443, 463, 483, 503, 523, 543, 563, 583, 603, 623, 643, 663, 683, 703, 723,
             743, 763, 783, 803, 823, 843, 863, 883, 903, 923, 943, 963, 983, 1003, 1023, 1043, 1063, 1083, 1103, 1123, 1143, 1163, 1183, 1203, 1223, 1243, 1263, 1283, 1303, 1323, 1343, 1363, 1383, 1403]
    # 魔法攻击力增加
    data2 = [0, 12, 26, 39, 51, 64, 77, 90, 103, 116, 129, 141, 154, 167, 180, 193, 206, 219, 231, 244, 257, 270, 283, 296, 309, 321, 334, 347, 360, 373, 386, 399, 411, 424, 437, 450,
             463, 476, 489, 501, 514, 527, 540, 553, 566, 579, 591, 604, 617, 630, 643, 656, 669, 681, 694, 707, 720, 733, 746, 759, 771, 784, 797, 810, 823, 836, 849, 861, 874, 887, 900]
    # [里 · 鬼剑术]剑气攻击力
    data3 = [0, 386, 399, 410, 422, 433, 443, 456, 466, 479, 489, 499, 512, 522, 536, 545, 555, 569, 579, 592, 602, 612, 625, 635, 648, 658, 669, 681, 692, 705, 715, 726, 738, 749, 761, 772,
             782, 795, 805, 818, 828, 840, 852, 862, 875, 885, 897, 908, 920, 931, 942, 953, 965, 977, 988, 999, 1010, 1022, 1033, 1045, 1056, 1067, 1077, 1088, 1098, 1109, 1119, 1130, 1140, 1151, 1161]

    def 物理攻击力倍率(self, 武器类型):
        if 武器类型 != '短剑':
            return 1.0
        else:
            return round(self.data1[self.等级] / 1000 + 1, 3)

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 != '短剑':
            return 1.0
        else:
            return round(self.data2[self.等级] / 1000 + 1, 3)

    # [里 · 鬼剑术]剑气攻击力 一轮3段
    def 里鬼附加百分比(self, 武器类型):
        if 武器类型 != '短剑':
            return 0
        else:
            return self.data3[self.等级]

    def 等级加成(self, x, char={}):
        if self.等级 != 0:
            self.等级 += x


class 技能6(被动技能):
    名称 = '太刀精通'
    所在等级 = 15
    等级上限 = 40
    学习间隔 = 3
    等级精通 = 1

    # 物理攻击力增加
    data1 = [0, 52, 67, 82, 97, 112, 127, 142, 157, 172, 187, 202, 217, 232, 247, 262, 277, 292, 307, 322, 337, 352, 367, 387, 407, 427, 447, 467, 487, 507, 527, 547, 567, 587, 607, 627, 647,
             667, 687, 707, 727, 747, 767, 787, 807, 827, 847, 867, 887, 907, 927, 947, 967, 987, 1007, 1027, 1047, 1067, 1087, 1107, 1127, 1147, 1167, 1187, 1207, 1227, 1247, 1267, 1287, 1307, 1327]
    # 魔法攻击力增加
    data2 = [0, 13, 28, 41, 54, 68, 82, 96, 109, 123, 137, 150, 164, 177, 191, 205, 219, 233, 245, 259, 273, 287, 301, 314, 328, 341, 355, 369, 382, 396, 410, 424, 437, 450, 464, 478,
             492, 506, 520, 532, 546, 560, 574, 588, 601, 615, 628, 642, 656, 669, 683, 697, 711, 724, 737, 751, 765, 779, 793, 806, 819, 833, 847, 861, 874, 888, 902, 915, 929, 942, 956]
    # 刺伤几率
    data3 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 45, 46, 46, 47, 47, 48, 48, 49, 49, 50,
             50, 51, 51, 52, 52, 53, 53, 54, 54, 55, 55, 56, 56, 57, 57, 58, 58, 59, 59, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64, 65, 65, 66, 66, 67, 67]
    # 刺伤爆炸伤害(下限)
    data4 = [int(i*1.071*(1/1.05)) for i in [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2242, 2382, 2523, 2663, 2800, 2940, 3077, 3220, 3359, 3499, 3636, 3779, 3917, 4060, 4195, 4337, 4472, 4615, 4756, 4896, 5034, 5173, 5312, 5454, 5591, 5735, 5873, 6015,
             6156, 6295, 6437, 6576, 6718, 6859, 7002, 7144, 7283, 7425, 7562, 7706, 7843, 7985, 8128, 8266, 8408, 8550, 8691, 8831, 8972, 9112, 9253, 9395, 9540, 9687, 9837, 9987, 10141, 10297, 10455, 10617, 10781]]
    # 刺伤爆炸伤害(上限)
    data5 = [int(i*1.071*(1/1.05)) for i in [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15575, 16544, 17513, 18482, 19451, 20421, 21389, 22359, 23328, 24296, 25265, 26235, 27203, 28173, 29140, 30110, 31078, 32048, 33017, 33985, 34954, 35924, 36892, 37862, 38832, 39800, 40770, 41738,
             42708, 43677, 44646, 45614, 46584, 47552, 48522, 49491, 50460, 51429, 52399, 53366, 54335, 55304, 56274, 57241, 58211, 59180, 60149, 61118, 62088, 63056, 64026, 64995, 65980, 66978, 67994, 69022, 70067, 71129, 72206, 73298, 74409]]
    # 刺伤持续伤害
    data6 = [int(i*1.071*(1/1.05)) for i in [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 15, 15, 17, 17, 17, 18,
             18, 18, 18, 18, 19, 19, 21, 21, 21, 22, 22, 23, 23, 23, 23, 23, 24, 24, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33]]
    # [空中连斩]附加攻击力
    data7 = [0, 66, 70, 74, 78, 80, 85, 88, 93, 96, 99, 103, 106, 110, 114, 118, 121, 125, 128, 131, 135, 139, 143, 146, 150, 154, 156, 161, 165, 168, 171, 176, 179, 183, 188, 190,
             194, 196, 200, 205, 209, 213, 259, 263, 268, 271, 276, 280, 285, 289, 294, 299, 303, 306, 311, 316, 320, 324, 329, 333, 338, 343, 348, 353, 358, 363, 368, 373, 378, 383, 388]

    def 物理攻击力倍率(self, 武器类型):
        if 武器类型 != '太刀':
            return 1.0
        else:
            return round(self.data1[self.等级] / 1000 + 1, 3)

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 != '太刀':
            return 1.0
        else:
            return round(self.data2[self.等级] / 1000 + 1, 3)

    def 刺伤概率(self, 武器类型):
        if 武器类型 != '太刀':
            return 0
        else:
            return self.data3[self.等级] / 100

    def 等级加成(self, x, char={}):
        if self.等级 != 0:
            if self.等级 + x > self.等级上限:
                self.等级 = self.等级上限
                if self.基础等级 != self.等级上限 and self.关联技能 != ['无']:
                    self.等级溢出 = 1
            else:
                self.等级 += x

    # 17层结算一次
    刺伤层数 = 0
    刺伤浮动 = 1

    def 刺伤百分比(self, 武器类型):
        if 武器类型 != '太刀':
            return 0
        else:
            return self.刺伤浮动 * self.刺伤层数 / 17 * self.data5[self.等级]

    # [空中连斩]附加攻击力
    def 太刀附加(self, 武器类型):
        if 武器类型 != '太刀':
            return 0
        else:
            return self.data7[self.等级]

    def 等级加成(self, x, char={}):
        if self.等级 != 0:
            self.等级 += x


class 技能7(被动技能):
    名称 = '巨剑精通'
    所在等级 = 15
    等级上限 = 2
    学习间隔 = 3
    等级精通 = 1

    # 物理攻击力增加
    data1 = [0, 69, 84, 99, 114, 129, 144, 159, 174, 189, 204, 219, 234, 249, 264, 279, 294, 309, 324, 339, 354, 369, 384, 404, 424, 444, 464, 484, 504, 524, 544, 564, 584, 604, 624, 644, 664,
             684, 704, 724, 744, 764, 784, 804, 824, 844, 864, 884, 904, 924, 944, 964, 984, 1004, 1024, 1044, 1064, 1084, 1104, 1124, 1144, 1164, 1184, 1204, 1224, 1244, 1264, 1284, 1304, 1324, 1344]
    # 魔法攻击力增加
    data2 = [0, 14, 31, 46, 60, 75, 90, 106, 121, 136, 151, 165, 181, 196, 211, 226, 242, 257, 271, 286, 302, 317, 332, 347, 363, 377, 392, 407, 422, 438, 453, 468, 482, 498, 513, 528,
             543, 559, 574, 588, 603, 618, 634, 649, 664, 679, 693, 709, 724, 739, 754, 770, 785, 799, 814, 830, 845, 860, 875, 891, 905, 920, 935, 950, 966, 981, 996, 1010, 1026, 1041, 1056]
    # [里 · 鬼剑术]额外附加
    data3 = [0, 238, 300, 362, 424, 487, 549, 611, 673, 735, 798, 860, 922, 984, 1047, 1109, 1171, 1233, 1295, 1358, 1420, 1482, 1544, 1607, 1668, 1730, 1792, 1854, 1917, 1979, 2041, 2103, 2166, 2228, 2290, 2352,
             2414, 2477, 2539, 2601, 2663, 2726, 2788, 2850, 2912, 2975, 3037, 3099, 3161, 3222, 3285, 3347, 3409, 3471, 3534, 3596, 3658, 3720, 3782, 3845, 3907, 3969, 4031, 4094, 4156, 4218, 4280, 4342, 4405, 4467, 4529]

    def 物理攻击力倍率(self, 武器类型):
        if 武器类型 != '巨剑':
            return 1.0
        else:
            return round(self.data1[self.等级] / 1000 + 1, 3)

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 != '巨剑':
            return 1.0
        else:
            return round(self.data2[self.等级] / 1000 + 1, 3)

    def 里鬼附加百分比(self, 武器类型):
        if 武器类型 != '巨剑':
            return 0
        else:
            return self.data3[self.等级]

    def 等级加成(self, x, char={}):
        if self.等级 != 0:
            self.等级 += x


class 技能8(被动技能):
    名称 = '钝器精通'
    所在等级 = 15
    等级上限 = 2
    学习间隔 = 3
    等级精通 = 1
    # 物理攻击力增加
    data1 = [0, 73, 88, 103, 118, 133, 148, 163, 178, 193, 208, 223, 238, 253, 268, 283, 298, 313, 328, 343, 358, 373, 388, 408, 428, 448, 468, 488, 508, 528, 548, 568, 588, 608, 628, 648, 668,
             688, 708, 728, 748, 768, 788, 808, 828, 848, 868, 888, 908, 928, 948, 968, 988, 1008, 1028, 1048, 1068, 1088, 1108, 1128, 1148, 1168, 1188, 1208, 1228, 1248, 1268, 1288, 1308, 1328, 1348]
    # 魔法攻击力增加
    data2 = [0, 14, 29, 44, 58, 73, 87, 102, 117, 132, 146, 160, 175, 189, 204, 219, 234, 248, 262, 277, 291, 306, 321, 336, 350, 364, 379, 393, 408, 423, 438, 452, 466, 481, 496, 510,
             525, 540, 554, 568, 583, 598, 612, 627, 642, 657, 670, 685, 700, 714, 729, 744, 759, 772, 787, 802, 816, 831, 846, 861, 874, 889, 904, 918, 933, 948, 963, 976, 991, 1006, 1021]

    def 物理攻击力倍率(self, 武器类型):
        if 武器类型 != '钝器':
            return 1.0
        else:
            return round(self.data1[self.等级] / 1000 + 1, 3)

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 != '钝器':
            return 1.0
        else:
            return round(self.data2[self.等级] / 1000 + 1, 3)

    def 等级加成(self, x, char={}):
        if self.等级 != 0:
            self.等级 += x


class 技能9(被动技能):
    名称 = '光剑精通'
    所在等级 = 15
    等级上限 = 2
    学习间隔 = 3
    等级精通 = 1
    # 物理攻击力增加
    data1 = [0, 95, 110, 125, 140, 155, 170, 185, 200, 215, 230, 245, 260, 275, 290, 305, 320, 335, 350, 365, 380, 395, 410, 430, 450, 470, 490, 510, 530, 550, 570, 590, 610, 630, 650, 670, 690,
             710, 730, 750, 770, 790, 810, 830, 850, 870, 890, 910, 930, 950, 970, 990, 1010, 1030, 1050, 1070, 1090, 1110, 1130, 1150, 1170, 1190, 1210, 1230, 1250, 1270, 1290, 1310, 1330, 1350, 1370]
    # 魔法攻击力增加
    data2 = [0, 25, 38, 50, 63, 76, 88, 101, 113, 126, 139, 151, 164, 176, 189, 202, 214, 227, 239, 252, 265, 277, 290, 302, 315, 328, 340, 353, 365, 378, 391, 403, 416, 428, 441, 454,
             66, 479, 491, 504, 517, 529, 542, 554, 567, 580, 592, 605, 617, 630, 630, 785, 800, 815, 831, 845, 860, 876, 890, 906, 921, 936, 951, 966, 981, 996, 1011, 1027, 1042, 1056, 1072]

    def 物理攻击力倍率(self, 武器类型):
        if 武器类型 != '光剑':
            return 1.0
        else:
            return round(self.data1[self.等级] / 1000 + 1, 3)

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 != '光剑':
            return 1.0
        else:
            return round(self.data2[self.等级] / 1000 + 1, 3)


class 技能10(剑魂流系技能):
    名称 = '流心刺'
    所在等级 = 20
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [30, 280]
    data0 = [int(i*1.082*(1/1.05)) for i in [0, 1401, 1542, 1684, 1827, 1969, 2111, 2252, 2396, 2539, 2682, 2823, 2965, 3107, 3251, 3393, 3534, 3676, 3819, 3961, 4102, 4245, 4387, 4529, 4671, 4814, 4956, 5098, 5239, 5381, 5524, 5666, 5808, 5951, 6093,
                              6235, 6375, 6519, 6661, 6803, 6945, 7088, 7229, 7370, 7513, 7656, 7798, 7940, 8083, 8224, 8366, 8507, 8650, 8793, 8935, 9077, 9219, 9361, 9504, 9645, 9788, 9930, 10071, 10213, 10356, 10498, 10641, 10782, 10925, 11066, 11208]]
    武器倍率 = {'短剑': 2 + 1, '光剑': 4 * 0.63, '巨剑': 2 +
            1, '钝器': 2 * 1.25, '太刀': 4 * 0.63}
    TP成长 = 0.10
    TP上限 = 7
    CD = 5.0

    # 95被动相关
    地面被动倍率 = {'短剑': 1.0, '光剑': 1.0, '巨剑': 1.0, '钝器': 1.0, '太刀': 1.0}
    空中被动倍率 = {'短剑': 1.0, '光剑': 1.0, '巨剑': 1.0, '钝器': 1.0, '太刀': 1.0}

    hit数 = 4
    刺伤几率 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
            54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87]
    可附加的刺伤数量 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

    def 额外刺伤层数(self, 武器类型):
        return self.刺伤几率[self.等级] / 100 * self.可附加的刺伤数量[self.等级]

    def 穿云刺数量(self, 武器类型):
        return 2

    形态 = ['地面', '空中']

    def 形态变更(self, 形态, char: Character):
        if 形态 == '' and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "地面":
            self.武器倍率 = {'短剑': 2 + 1, '光剑': 4 * 0.63,
                         '巨剑': 2 + 1, '钝器': 2 * 1.25, '太刀': 4 * 0.63}
            self.power0 = self.地面被动倍率[char.武器类型]
        elif 形态 == "空中":
            self.武器倍率 = {'短剑': 2, '光剑': 2, '巨剑': 2, '钝器': 2 * 1.25, '太刀': 2}
            self.power0 = self.空中被动倍率[char.武器类型]
            self.hit数 = 2


class 技能11(被动技能):
    名称 = '无我剑气'
    所在等级 = 20
    等级上限 = 15
    学习间隔 = 3
    等级精通 = 5

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.00 + 0.02 * self.等级, 5)


class 技能12(剑魂流系技能):
    名称 = '流心跃'
    所在等级 = 25
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [30, 350]
    data0 = [int(i*1.097*(1/1.05)) for i in [0, 5130, 5650, 6170, 6691, 7212, 7733, 8254, 8773, 9294, 9815, 10336, 10857, 11376, 11897, 12419, 12940, 13461, 13980, 14500, 15021, 15542, 16062, 16583, 17104, 17624, 18144, 18663, 19185, 19706, 20224, 20746, 21267, 21787, 22309,
                              22828, 23347, 23869, 24389, 24911, 25432, 25951, 26472, 26994, 27513, 28032, 28554, 29074, 29594, 30115, 30636, 31156, 31677, 32197, 32718, 33239, 33760, 34279, 34802, 35322, 35843, 36365, 36882, 37403, 37924, 38445, 38966, 39486, 40006, 40527, 41048]]
    TP成长 = 0.10
    TP上限 = 7
    CD = 7.0

    武器倍率 = {'短剑': 2 * 0.5, '光剑': 1, '巨剑': 1, '钝器': 1, '太刀': 2 * 0.5}

    # 95被动相关
    地面被动倍率 = {'短剑': 1.0, '光剑': 1.0, '巨剑': 1.0, '钝器': 1.0, '太刀': 1.0}
    空中被动倍率 = {'短剑': 1.0, '光剑': 1.0, '巨剑': 1.0, '钝器': 1.0, '太刀': 1.0}

    hit数 = 2
    刺伤几率 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
            71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 100, 100, 100, 100]
    可附加的刺伤数量 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
                2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]

    def 额外刺伤层数(self, 武器类型):
        return self.刺伤几率[self.等级] / 100 * self.可附加的刺伤数量[self.等级]

    def 穿云刺数量(self, 武器类型):
        return 2

    形态 = ['地面', '空中']

    def 形态变更(self, 形态, char: Character):
        if 形态 == '' and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "地面":
            self.武器倍率['钝器'] = 1.0
        elif 形态 == "空中":
            self.武器倍率['钝器'] = 1.2
        self.power0 = self.空中被动倍率[char.武器类型]


class 技能13(剑魂主动技能):
    名称 = '流心狂'
    所在等级 = 30
    等级上限 = 20
    学习间隔 = 3
    等级精通 = 10
    是否有伤害 = 0
    MP = [20, 168]
    关联技能 = ['流心刺', '流心跃', '流心升']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.20 + 0.02 * self.等级, 5)


class 技能14(剑魂流系技能):
    名称 = '流心升'
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [50, 490]
    data0 = [int(i*1.073*(1/1.05)) for i in [0, 3516, 3872, 4233, 4588, 4944, 5301, 5658, 6015, 6371, 6726, 7087, 7443, 7799, 8156, 8513, 8871, 9225, 9585, 9943, 10298, 10654, 11013, 11368, 11726, 12081, 12440, 12796, 13152, 13508, 13867, 14224, 14579, 14936, 15294, 15651,
                              16007, 16362, 16723, 17078, 17434, 17791, 18149, 18507, 18864, 19220, 19578, 19933, 20288, 20645, 21003, 21361, 21718, 22074, 22431, 22787, 23143, 23504, 23860, 24216, 24572, 24929, 25286, 25644, 26000, 26359, 26715, 27070, 27427, 27784, 28142]]
    TP成长 = 0.10
    TP上限 = 7
    CD = 9.0

    武器倍率 = {'短剑': 1 + 1.1, '光剑': 3 * 0.8,
            '巨剑': 1 + 1.1, '钝器': 1 + 1.1, '太刀': 3 * 0.8}

    hit数 = 3
    刺伤几率 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
            100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
    可附加的刺伤数量 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3,
                3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]

    def 额外刺伤层数(self, 武器类型):
        return self.刺伤几率[self.等级] / 100 * self.可附加的刺伤数量[self.等级]

    def 穿云刺数量(self, 武器类型):
        return 2


class 技能15(剑魂主动技能):
    名称 = '破军升龙击'
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [70, 700]
    data0 = [int(i*1.073*(1/1.05)) for i in [0, 1580, 1740, 1901, 2062, 2220, 2382, 2542, 2701, 2862, 3022, 3183, 3342, 3502, 3664, 3824, 3984, 4144, 4304, 4466, 4625, 4787, 4948, 5106, 5268, 5427, 5588, 5748, 5909, 6069, 6228, 6390, 6550, 6712, 6867,
                              7030, 7192, 7352, 7513, 7673, 7834, 7993, 8155, 8317, 8476, 8637, 8796, 8957, 9116, 9277, 9438, 9598, 9756, 9918, 10079, 10236, 10396, 10558, 10718, 10880, 11042, 11202, 11363, 11519, 11681, 11844, 12000, 12162, 12321, 12483, 12641]]
    data1 = [int(i*1.073*(1/1.05)) for i in [0, 2439, 2685, 2932, 3180, 3428, 3675, 3920, 4169, 4416, 4663, 4913, 5160, 5404, 5656, 5901, 6149, 6397, 6645, 6890, 7137, 7386, 7633, 7881, 8126, 8376, 8622, 8871, 9119, 9366, 9611, 9859, 10108, 10355, 10603, 10848,
                              11096, 11345, 11593, 11840, 12088, 12335, 12582, 12828, 13076, 13324, 13571, 13816, 14065, 14312, 14562, 14810, 15053, 15302, 15550, 15799, 16046, 16290, 16539, 16787, 17036, 17283, 17529, 17776, 18024, 18271, 18520, 18768, 19015, 19261, 19509]]
    TP成长 = 0.10
    TP上限 = 5
    CD = 10.0

    冲撞倍率 = {'短剑': 2, '光剑': 4, '巨剑': 2, '钝器': 2, '太刀': 2}
    上斩倍率 = {'短剑': 1, '光剑': 1, '巨剑': 3, '钝器': 3, '太刀': 2}
    武器倍率 = {'短剑': 1.45, '光剑': 1, '巨剑': 1, '钝器': 1, '太刀': 1}

    def 等效百分比(self, **argv):
        武器类型 = argv.get('武器类型', '光剑')
        self.hit0 = self.冲撞倍率[武器类型]
        self.hit1 = self.上斩倍率[武器类型]
        return super().等效百分比(**argv)

    # 极神剑术被动相关,短剑影响;与上斩数据相关
    def 极神剑术占比(self, 武器类型):
        if self.等级 == 0:
            return 0
        return self.data1[self.等级] * (1 + self.TP成长 * self.TP等级) * self.倍率 * self.武器百分比修正(武器类型=武器类型) / self.等效百分比(武器类型=武器类型)

    hit数 = 3
    刺伤几率 = [0, 0, 0, 0, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620,
            630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970]
    可附加的刺伤数量 = [0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
                2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]

    def 额外刺伤层数(self, 武器类型):
        return self.刺伤几率[self.等级] / 1000 * self.可附加的刺伤数量[self.等级]


class 技能16(剑魂主动技能):
    名称 = '拔刀斩'
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [int(i*1.076*(1/1.05)) for i in [0, 7803, 8598, 9389, 10181, 10972, 11761, 12558, 13349, 14140, 14933, 15723, 16515, 17307, 18099, 18889, 19682, 20473, 21264, 22058, 22849, 23642, 24432, 25224, 26018, 26810, 27602, 28392, 29184, 29975, 30767, 31558, 32351, 33145,
                              33934, 34728, 35519, 36311, 37103, 37894, 38685, 39479, 40270, 41062, 41855, 42647, 43437, 44230, 45020, 45814, 46604, 47396, 48188, 48980, 49772, 50564, 51356, 52146, 52941, 53730, 54523, 55317, 56106, 56898, 57691, 58483, 59277, 60067, 60858, 61651, 62441]]
    武器倍率 = {'短剑': 1.4, '光剑': 1.3, '巨剑': 1.3, '钝器': 1.3, '太刀': 1.25}
    TP成长 = 0.10
    TP上限 = 5
    CD = 15.0
    是否有护石 = 1
    触发神影手 = 0

    MP = [110, 924]
    无色消耗 = 1

    # 拔刀奥义
    # 准备动作时间 -30%
    # 短剑 : 剑气的拔刀斩攻击力比率 +28%
    # 太刀 : 追加攻击的拔刀斩攻击力比率 +25%
    # 钝器 : 追加攻击的拔刀斩攻击力比率 +26%
    # 巨剑 : [巨剑精通]最大蓄气时[拔刀斩]攻击力增加量 +26%
    # 光剑 : 追加攻击的拔刀斩攻击力比率 +26%
    # 攻击成功时发动[神影手] (一次[拔刀斩]最多发动1次)
    # 攻击范围 +20%
    # 攻击力 +5%

    def 装备护石(self):
        self.武器倍率 = {'短剑': 1.4 + 0.28, '光剑': 1.3 + 0.26,
                     '巨剑': 1.3 + 0.26, '钝器': 1.3 + 0.26, '太刀': 1.25 + 0.25}
        self.倍率 *= 1.12
        self.触发神影手 = 1

    hit数 = 2
    刺伤几率 = [0, 0, 0, 0, 0, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 100, 100, 100, 100,
            100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
    可附加的刺伤数量 = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7,
                7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]
    追加刺伤几率 = [0, 0, 0, 0, 0, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98,
              100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
    追加可附加的刺伤数量 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3,
                  3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7]

    def 额外刺伤层数(self, 武器类型):
        return self.刺伤几率[self.等级] / 100 * self.可附加的刺伤数量[self.等级] + self.追加刺伤几率[self.等级] / 100 * self.追加可附加的刺伤数量[self.等级]


class 技能17(剑魂主动技能):
    名称 = '破军斩龙击'
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [int(i*1.091*(1/1.05)) for i in [0, 3983, 4387, 4791, 5196, 5598, 6002, 6407, 6811, 7214, 7622, 8022, 8428, 8834, 9238, 9640, 10046, 10450, 10854, 11256, 11663, 12067, 12469, 12875, 13279, 13684, 14087, 14492, 14895, 15300, 15704, 16109, 16512, 16916, 17321,
                              17726, 18127, 18533, 18937, 19341, 19745, 20150, 20554, 20957, 21363, 21765, 22171, 22576, 22981, 23382, 23786, 24193, 24596, 24997, 25405, 25808, 26214, 26618, 27022, 27426, 27829, 28235, 28639, 29042, 29447, 29852, 30253, 30660, 31065, 31467, 31871]]
    hit0 = 1
    data1 = [int(i*1.091*(1/1.05)) for i in [0, 4779, 5266, 5749, 6234, 6719, 7205, 7688, 8177, 8659, 9145, 9628, 10115, 10600, 11084, 11569, 12052, 12539, 13027, 13509, 13995, 14480, 14965, 15449, 15935, 16420, 16905, 17389, 17875, 18360, 18846, 19330, 19815, 20297, 20786,
                              21270, 21753, 22243, 22725, 23212, 23696, 24178, 24667, 25148, 25634, 26121, 26603, 27092, 27574, 28058, 28544, 29034, 29514, 29999, 30484, 30971, 31455, 31940, 32424, 32913, 33395, 33880, 34366, 34850, 35335, 35820, 36305, 36789, 37276, 37761, 38244]]
    hit1 = 1
    data2 = [int(i*1.091*(1/1.05)) for i in [0, 7170, 7900, 8624, 9352, 10080, 10808, 11535, 12265, 12991, 13721, 14445, 15173, 15901, 16629, 17357, 18082, 18810, 19539, 20265, 20991, 21721, 22450, 23178, 23903, 24631, 25359, 26087, 26814, 27541, 28268, 28998, 29722, 30448, 31179,
                              31903, 32631, 33362, 34087, 34818, 35545, 36273, 36997, 37724, 38452, 39183, 39908, 40639, 41361, 42090, 42817, 43545, 44275, 45000, 45729, 46455, 47183, 47910, 48638, 49366, 50096, 50820, 51549, 52276, 53004, 53731, 54459, 55185, 55914, 56640, 57368]]
    hit2 = 1
    TP成长 = 0.10
    TP上限 = 5
    CD = 25.0

    MP = [30, 450]
    无色消耗 = 1

    hit数 = 4
    刺伤几率 = [0, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
            100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
    可附加的刺伤数量 = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4,
                4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8]

    def 额外刺伤层数(self, 武器类型):
        return self.刺伤几率[self.等级] / 100 * self.可附加的刺伤数量[self.等级]

    def 穿云刺数量(self, 武器类型):
        return 5


class 技能18(剑魂主动技能):
    名称 = '猛龙断空斩'
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [int(i*1.071*(1/1.05)) for i in [0, 2382, 2625, 2867, 3107, 3350, 3591, 3833, 4073, 4316, 4558, 4799, 5041, 5285, 5527, 5768, 6009, 6253, 6494, 6732, 6977, 7219, 7459, 7701, 7944, 8185, 8427, 8669, 8911, 9153, 9395, 9636, 9879, 10119, 10361, 10604, 10845,
                              11087, 11328, 11570, 11812, 12053, 12295, 12539, 12778, 13020, 13261, 13504, 13746, 13987, 14231, 14473, 14715, 14956, 15199, 15438, 15682, 15920, 16164, 16406, 16647, 16890, 17132, 17373, 17615, 17858, 18098, 18341, 18581, 18825, 19066]]
    hit0 = 2
    data1 = [int(i*1.071*(1/1.05)) for i in [0, 3499, 3856, 4211, 4567, 4920, 5276, 5632, 5988, 6341, 6698, 7053, 7406, 7764, 8119, 8474, 8830, 9183, 9538, 9894, 10250, 10605, 10960, 11315, 11672, 12025, 12381, 12736, 13092, 13446, 13802, 14157, 14513, 14867, 15221, 15578,
                              15934, 16288, 16643, 17000, 17352, 17708, 18064, 18420, 18774, 19130, 19486, 19841, 20194, 20550, 20906, 21261, 21618, 21971, 22327, 22683, 23036, 23392, 23747, 24103, 24457, 24813, 25169, 25525, 25877, 26235, 26589, 26943, 27300, 27656, 28010]]
    hit1 = 2
    武器倍率 = {'短剑': 1.25, '光剑': 1.0, '巨剑': 1.0, '钝器': 1.0, '太刀': 1.0}
    TP成长 = 0.10
    TP上限 = 5
    CD = 20.0
    hit数 = 4 + 8
    旋风攻击次数 = 4 * 2
    是否有护石 = 1

    MP = [25, 420]
    无色消耗 = 1

    # 极神剑术被动相关,短剑影响
    def 极神剑术占比(self, 武器类型):
        if self.等级 == 0:
            return 0
        return self.data0[self.等级] * (1 + self.TP成长 * self.TP等级) * self.倍率 * self.武器百分比修正(武器类型=武器类型) / self.等效百分比(武器类型=武器类型)

    # 猛龙过江
    # 巴恩的飓风强化 (学习[极 · 神剑术]后发动)
    #- 移动时追击周围敌人
    # - 持续时间 +1秒
    #- 多段攻击次数上限 +5
    # - 攻击力 -57%
    #- 突进上斩动作结束时生成旋风
    # - 大小 +80%
    # - 多段攻击次数上限 +2次

    def 装备护石(self):
        self.hit数 = 4 + 11 * 3
        self.旋风攻击次数 = 11 * 3 * 0.43
        self.倍率 *= 1.07


class 技能19(剑魂主动技能):
    名称 = '幻影剑舞'
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [int(i*1.082*(1/1.05)) for i in [0, 878, 967, 1057, 1147, 1236, 1326, 1414, 1503, 1594, 1681, 1770, 1859, 1950, 2040, 2126, 2217, 2307, 2397, 2485, 2575, 2660, 2752, 2842, 2931, 3021, 3109, 3199, 3289, 3377, 3465, 3556, 3643, 3733,
                              3822, 3911, 4003, 4089, 4179, 4269, 4357, 4449, 4536, 4626, 4714, 4804, 4894, 4983, 5070, 5161, 5251, 5339, 5430, 5518, 5608, 5696, 5785, 5874, 5962, 6052, 6141, 6232, 6320, 6411, 6500, 6589, 6677, 6766, 6857, 6943, 7033]]
    data1 = [int(i*1.082*(1/1.05)) for i in [0, 3519, 3873, 4230, 4587, 4943, 5302, 5658, 6015, 6373, 6728, 7087, 7442, 7797, 8158, 8513, 8871, 9227, 9583, 9941, 10298, 10654, 11013, 11369, 11723, 12081, 12438, 12794, 13152, 13509, 13866, 14224, 14580, 14937, 15294, 15649,
                              16010, 16364, 16720, 17079, 17436, 17792, 18149, 18504, 18864, 19220, 19577, 19934, 20291, 20646, 21003, 21360, 21717, 22074, 22431, 22786, 23147, 23502, 23857, 24216, 24571, 24931, 25286, 25643, 26002, 26357, 26714, 27072, 27426, 27783, 28142]]
    TP成长 = 0.10
    TP上限 = 5
    CD = 45.0
    是否有护石 = 1
    影子斩击次数 = 4

    MP = [360, 3024]
    无色消耗 = 2
    # 这里的武器倍率已经被计算入内
    斩击倍率 = {'短剑': 12 * 0.9, '光剑': 24 * 0.75,
            '巨剑': 12 * 1.5, '钝器': 12, '太刀': 24 * 0.75}
    剑气倍率 = {'短剑': 4 * 1.2, '光剑': 3, '巨剑': 3, '钝器': 4.2, '太刀': 3}

    def 等效百分比(self, **argv):
        武器类型 = argv.get('武器类型', '光剑')
        self.hit0 = self.斩击倍率[武器类型]
        self.hit1 = self.剑气倍率[武器类型]
        return super().等效百分比(**argv)

    # 极神剑术被动相关,武器倍率不影响
    def 极神剑术斩击占比(self, 武器类型):
        return self.data0[self.等级] * (1 + self.TP成长 * self.TP等级) * self.倍率 / self.等效百分比(武器类型=武器类型)

    # 极神剑术被动相关,武器倍率不影响
    def 极神剑术剑气占比(self, 武器类型):
        return self.data1[self.等级] * (1 + self.TP成长 * self.TP等级) * self.倍率 / self.等效百分比(武器类型=武器类型)

    hit数 = 24 + 3 + 4 + 3  # 本体斩击:24  本体剑气:3  影子斩击:4  影子剑气:3
    刺伤几率 = [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18,
            19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 35, 35]
    可附加的刺伤数量 = [0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
                2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]

    def 额外刺伤层数(self, 武器类型):
        return self.刺伤几率[self.等级] / 100 * self.可附加的刺伤数量[self.等级] * (24 + 3)

    def 穿云刺数量(self, 武器类型):
        return 4

    # 无形剑舞
    # 攻击范围 +25%
    # 幻影斩击多段攻击次数 +8次
    # 施放过程中所受伤害 -90%
    # 幻影斩击多段攻击次数 +5次

    def 装备护石(self):
        self.倍率 *= 1.06
        self.影子斩击次数 += 13
        self.hit数 += 13


class 技能20(被动技能):
    名称 = '极鬼剑术斩铁式'
    所在等级 = 48
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(0.995 + 0.03 + 0.02 * self.等级, 5)


class 技能21(剑魂主动技能):
    名称 = '极鬼剑术暴风式'
    所在等级 = 50
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    data0 = [int(i*1.074*(1/1.05)) for i in [0, 5047, 6218, 7390, 8560, 9731, 10902, 12074, 13246, 14416, 15585, 16759, 17930, 19099, 20271, 21444, 22615, 23782, 24954, 26125, 27295, 28466, 29636, 30809, 31980, 33150, 34322, 35495, 36664, 37835, 39006, 40179, 41349, 42518, 43689,
                              44859, 46032, 47203, 48371, 49543, 50713, 51886, 53057, 54228, 55400, 56570, 57740, 58912, 60084, 61254, 62421, 63595, 64766, 65935, 67108, 68280, 69449, 70619, 71791, 72963, 74134, 75306, 76476, 77647, 78818, 79986, 81156, 82331, 83499, 84671, 85843]]
    hit0 = 1
    data1 = [int(i*1.074*(1/1.05)) for i in [0, 2402, 2961, 3516, 4079, 4631, 5194, 5748, 6305, 6865, 7419, 7979, 8538, 9093, 9653, 10211, 10768, 11323, 11884, 12441, 12998, 13555, 14114, 14669, 15229, 15783, 16343, 16898, 17458, 18015, 18574, 19132, 19688, 20246, 20804,
                              21359, 21920, 22474, 23035, 23591, 24149, 24705, 25265, 25823, 26380, 26938, 27494, 28053, 28610, 29168, 29725, 30283, 30839, 31402, 31955, 32513, 33071, 33627, 34186, 34742, 35302, 35859, 36416, 36974, 37529, 38089, 38647, 39204, 39761, 40320, 40875]]
    hit1 = 24
    data2 = [int(i*1.074*(1/1.05)) for i in [0, 9375, 11551, 13726, 15903, 18073, 20249, 22425, 24600, 26772, 28947, 31122, 33298, 35471, 37645, 39823, 41995, 44170, 46344, 48520, 50693, 52867, 55044, 57219, 59392, 61565, 63740, 65917, 68091, 70266, 72439, 74614, 76790, 78964, 81138, 83314,
                              85487, 87660, 89838, 92008, 94186, 96360, 98533, 100708, 102883, 105056, 107234, 109407, 111581, 113758, 115930, 118106, 120281, 122455, 124631, 126802, 128979, 131154, 133326, 135502, 137677, 139852, 142028, 144201, 146375, 148553, 150724, 152899, 155074, 157249, 159421]]
    hit2 = 1
    CD = 145.0
    hit数 = 26

    MP = [980, 8232]
    无色消耗 = 5

    def 等效百分比(self, **argv):
        if self.等级 >= 9:
            self.倍率 = 1.1
        return super().等效百分比(**argv)


class 技能22(剑魂主动技能):
    名称 = '极神剑术流星落'
    所在等级 = 60
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i*1.093*(1/1.05)) for i in [0, 3636, 4007, 4375, 4745, 5111, 5483, 5850, 6220, 6588, 6958, 7326, 7697, 8064, 8434, 8804, 9170, 9540, 9911, 10278, 10648, 11017, 11386, 11755, 12125, 12492, 12863, 13233, 13599, 13966, 14337, 14707, 15076, 15445, 15814, 16181,
                              16551, 16921, 17292, 17658, 18028, 18395, 18766, 19137, 19504, 19874, 20243, 20608, 20980, 21351, 21718, 22087, 22457, 22824, 23195, 23563, 23933, 24302, 24671, 25037, 25409, 25780, 26146, 26516, 26883, 27250, 27621, 27992, 28362, 28731, 29096]]
    hit0 = 1
    data1 = [int(i*1.093*(1/1.05)) for i in [0, 668, 736, 806, 873, 940, 1010, 1077, 1146, 1213, 1280, 1351, 1416, 1486, 1554, 1622, 1689, 1758, 1824, 1891, 1962, 2028, 2094, 2167, 2234, 2299, 2369, 2436, 2504, 2571, 2642, 2708, 2777, 2845,
                              2912, 2980, 3048, 3115, 3184, 3253, 3321, 3390, 3456, 3524, 3592, 3661, 3726, 3798, 3864, 3932, 4001, 4069, 4134, 4204, 4271, 4339, 4408, 4476, 4546, 4611, 4680, 4747, 4816, 4883, 4954, 5019, 5086, 5156, 5224, 5290, 5359]]
    hit1 = 38
    data2 = [int(i*1.093*(1/1.05)) for i in [0, 7274, 8013, 8749, 9486, 10228, 10964, 11702, 12442, 13178, 13915, 14657, 15392, 16129, 16871, 17607, 18344, 19084, 19820, 20557, 21299, 22033, 22772, 23512, 24249, 24985, 25726, 26462, 27199, 27939, 28677, 29412, 30154, 30891, 31627,
                              32367, 33106, 33841, 34582, 35320, 36059, 36796, 37532, 38271, 39009, 39747, 40484, 41225, 41961, 42699, 43438, 44176, 44912, 45651, 46389, 47127, 47866, 48605, 49341, 50080, 50816, 51555, 52294, 53029, 53768, 54508, 55245, 55983, 56723, 57458, 58197]]
    hit2 = 1
    TP成长 = 0.10
    TP上限 = 5
    CD = 35.0
    是否有护石 = 1
    流星之天剑倍率 = 1.0  # 极神剑术被动相关

    MP = [420, 1200]
    无色消耗 = 1

    hit数 = 40
    流星之天剑刺伤层数 = 0  # 极神剑术被动相关
    刺伤几率 = [0, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 116, 119, 122, 125, 128, 131, 134,
            137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173, 176, 179, 182, 185, 188, 191, 194, 197, 200, 203, 206, 209, 212, 215, 218, 221, 224, 227, 230, 233, 236]
    可附加的刺伤数量 = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
                1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]

    def 额外刺伤层数(self, 武器类型):
        return min(self.刺伤几率[self.等级] / 100, 1) * self.可附加的刺伤数量[self.等级] + self.流星之天剑刺伤层数

    # 流星审判
    # 跳跃冲击波攻击强制控制敌人1.5秒
    # 跳跃动作变更为无敌状态， 落地后增加1秒无敌时间
    # 投掷流星剑前置准备时间 -50%
    # 流星剑间隔 -20%
    # 流星剑数量 +9个
    # 流星剑和流星之天剑攻击范围 +55%
    # 流星之天剑攻击力 +35%
    # 流星之天剑强制控制时间 +60%

    def 装备护石(self):
        self.hit数 += 9
        self.hit1 += 9
        self.流星之天剑倍率 = 2.05


class 技能23(剑魂主动技能):
    名称 = '破空拔刀斩'
    备注 = '近距离'
    所在等级 = 70
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    # 近距离百分比而非剑气
    data0 = [int(i*1.091*(1/1.05)) for i in [0, 40206, 44283, 48360, 52440, 56517, 60599, 64678, 68755, 72836, 76913, 80991, 85072, 89152, 93229, 97308, 101386, 105463, 109545, 113621, 117701, 121781, 125859, 129940, 134017,
                              138097, 142175, 146253, 150333, 154407, 158490, 162568, 166647, 170726, 174808, 178883, 182964, 187041, 191121, 195199, 199278, 203357, 207435, 211512, 215594, 219671, 223752, 227829, 231908, 235988, 240065]]
    hit0 = 1
    TP成长 = 0.10
    TP上限 = 5
    CD = 50.0
    是否有护石 = 1

    MP = [800, 1680]
    无色消耗 = 2

    hit数 = 1
    刺伤几率 = [0, 31, 35, 39, 43, 47, 51, 55, 59, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 100, 100, 100, 100, 100, 100, 100, 100,
            100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]
    可附加的刺伤数量 = [0, 3, 3, 3, 5, 5, 5, 7, 7, 7, 9, 9, 9, 11, 11, 11, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15,
                15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15]

    def 额外刺伤层数(self, 武器类型):
        return self.刺伤几率[self.等级] / 100 * self.可附加的刺伤数量[self.等级]

    # 破空一刀
    # 剑气攻击适用与近距离击打相同的攻击力
    # 准备动作时间 -40%
    # 冷却时间 -10%
    # 剑气生成后僵直 -20%
    # 攻击力 +11%

    def 装备护石(self):
        self.倍率 *= 1.19
        self.CDR *= 0.9


class 技能24(被动技能):
    名称 = '神影手'
    所在等级 = 70
    等级上限 = 1
    学习间隔 = 1
    等级精通 = 1
    关联技能 = ['无']
    百分比 = 4080


class 技能25(剑魂主动技能):
    名称 = '极神剑术破空斩'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i*1.098*(1/1.05)) for i in [0, 6384, 7031, 7681, 8325, 8975, 9622, 10271, 10917, 11568, 12213, 12863, 13508, 14159, 14806, 15450, 16101, 16747, 17397, 18041, 18692, 19337, 19987, 20635, 21281, 21930, 22577, 23226, 23872, 24521, 25169, 25816, 26465, 27111, 27760,
                              28405, 29056, 29703, 30353, 30998, 31648, 32293, 32943, 33589, 34237, 34884, 35532, 36181, 36828, 37477, 38123, 38772, 39421, 40067, 40715, 41361, 42009, 42659, 43306, 43954, 44604, 45249, 45897, 46545, 47191, 47840, 48488, 49136, 49783, 50430, 51079]]
    data1 = [int(i*1.098*(1/1.05)) for i in [0, 21281, 23440, 25599, 27760, 29919, 32077, 34237, 36396, 38555, 40715, 42876, 45032, 47191, 49352, 51510, 53670, 55832, 57988, 60147, 62305, 64465, 66626, 68784, 70942, 73102, 75262, 77420, 79581, 81740, 83897, 86056, 88218, 90375, 92537, 94694, 96853,
                              99012, 101170, 103331, 105488, 107650, 109809, 111968, 114125, 116287, 118443, 120605, 122764, 124923, 127081, 129241, 131398, 133560, 135718, 137875, 140037, 142195, 144354, 146511, 148674, 150830, 152993, 155150, 157309, 159467, 161630, 163786, 165946, 168104, 170265]]
    CD = 35.0
    是否有护石 = 1
    # 武器倍率已计入
    多段倍率 = {'短剑': 5, '光剑': 6, '巨剑': 5 * 1.08, '钝器': 5, '太刀': 6}
    爆炸倍率 = {'短剑': 1, '光剑': 1, '巨剑': 1.08, '钝器': 1, '太刀': 1}
    # def 等效百分比(self, 武器类型):
    #     return (self.多段倍率[武器类型] * self.data1[self.等级] + self.爆炸倍率[武器类型] * self.data2[self.等级]) * self.倍率

    # 极神剑术被动相关,巨剑蓄力会影响
    def 等效百分比(self, **argv):
        武器类型 = argv.get('武器类型', '光剑')
        self.hit0 = self.多段倍率[武器类型]
        self.hit1 = self.爆炸倍率[武器类型]
        return super().等效百分比(**argv)

    # 极神剑术被动相关,巨剑蓄力会影响
    def 极神剑术占比(self, 武器类型):
        if self.等级 == 0:
            return 0
        return self.爆炸倍率[武器类型] * self.data1[self.等级] * self.倍率 / self.等效百分比(武器类型=武器类型)

    MP = [580, 4500]
    无色消耗 = 2

    hit数 = 7
    刺伤几率 = [0, 530, 550, 570, 590, 610, 630, 650, 670, 690, 710, 730, 750, 770, 790, 810, 830, 850, 870, 890, 910, 930, 950, 970, 990, 1010, 1030, 1050, 1070, 1090, 1110, 1130, 1150, 1170, 1190, 1210, 1230,
            1250, 1270, 1290, 1310, 1330, 1350, 1370, 1390, 1410, 1430, 1450, 1470, 1490, 1510, 1530, 1550, 1570, 1590, 1610, 1630, 1650, 1670, 1690, 1710, 1730, 1750, 1770, 1790, 1810, 1830, 1850, 1870, 1890, 1910]
    可附加的刺伤数量 = [0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
                3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]

    def 额外刺伤层数(self, 武器类型):
        return min(self.刺伤几率[self.等级] / 1000, 1) * self.可附加的刺伤数量[self.等级]

    def 穿云刺数量(self, 武器类型):
        return 4

    def 装备护石(self):
        self.data1 = [i * 1.62 for i in self.data1]


class 技能26(被动技能):
    名称 = '极神剑术'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    额外倍率 = 1.0

    关联技能 = ['拔刀斩', '破军斩龙击', '极鬼剑术暴风式', '破空拔刀斩',
            '极神剑术瞬斩', '万剑归宗', '极神剑术无形斩', '万剑极诣开天斩']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.22 + 0.02 * self.等级, 5)

    # 基础值 40%
    暴风式冲击波 = [int(i) for i in [0, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136,
                               140, 144, 148, 152, 156, 160, 164, 168, 172, 176, 180, 184, 188, 192, 196, 200, 204, 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248, 252, 256, 260, 264, 268, 272, 276]]
    # 基础值 21%
    飓风 = [int(i) for i in [0, 0, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 620, 640, 660, 680,
                           700, 720, 740, 760, 780, 800, 820, 840, 860, 880, 900, 920, 940, 960, 980, 1000, 1020, 1040, 1060, 1080, 1100, 1120, 1140, 1160, 1180, 1200, 1220, 1240, 1260, 1280, 1300, 1320, 1340, 1360, 1380]]
    # 基础值 55%
    幻影斩击 = [int(i) for i in [0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165,
                             170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 335, 340, 345]]
    # 基础值 55%
    幻影剑气 = [int(i) for i in [0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165,
                             170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 335, 340, 345]]
    # 基础值 41%
    幻影钝器 = [int(i) for i in [0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165,
                             170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 335, 340, 345]]
    # 基础值 60%
    十字斩 = [int(i) for i in [0, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198,
                            204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, 384, 390, 396, 402, 408, 414]]
    # 流星之天剑
    流星之天剑 = [int(i*1.093*(1/1.05)) for i in [0, 3916, 4243, 4568, 4894, 5223, 5549, 5875, 6201, 6526, 6854, 7181, 7506, 7833, 8159, 8487, 8811, 9138, 9462, 9791, 10118, 10444, 10770, 11097, 11424, 11748, 12076, 12403, 12728, 13055, 13381, 13706, 14034, 14361, 14685,
                              15013, 15340, 8539, 8710, 8877, 9050, 9220, 9389, 9562, 9735, 9902, 10073, 10246, 10414, 10584, 10758, 10924, 11097, 11269, 11437, 11610, 11779, 11947, 12119, 12292, 12460, 12632, 12805, 12971, 13142, 13315, 13481, 13655, 13826, 13994, 14166]]
    # 巨剑流星之天剑追加
    巨剑流星之天剑 = [int(i*1.093*(1/1.05)) for i in [0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
                                42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80]]
    # 钝器冲击波
    钝器流星之天剑 = [int(i*1.093*(1/1.05)) for i in [0, 2426, 2632, 2836, 3038, 3244, 3449, 3654, 3859, 4061, 4268, 4472, 4679, 4883, 5085, 5290, 5496, 5700, 5905, 6107, 6314, 6519, 6724, 6929, 7132, 7338, 7542, 7746, 7951, 8155, 8359, 8564, 8771, 8976, 9178, 9384,
                                9589, 9793, 9999, 10202, 10406, 10612, 10816, 11023, 11224, 11430, 11636, 11840, 12045, 12249, 12453, 12658, 12863, 13067, 13271, 13476, 13681, 13887, 14091, 14295, 14499, 14704, 14909, 15113, 15316, 15522, 15726, 15934, 16138, 16341, 16547]]
    # 太刀刺伤
    刺伤几率 = [int(i) for i in [0, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100,
                             100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]]
    可附加的刺伤数量 = [int(i) for i in [0, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12,
                                 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12]]
    # 光剑冲击波
    光剑流星之天剑 = [int(i*1.093*(1/1.05)) for i in [1624, 1873, 2119, 2366, 2613, 2861, 3105, 3354, 3601, 3847, 4096, 4342, 4590, 4837, 5084, 5330, 5577, 5824, 6071, 6319, 6566, 6811, 7059, 7304, 7553, 7800, 8046, 8294, 8541, 8787, 9034, 9282, 9527, 9776, 10023, 10268,
                                10517, 10763, 11011, 11257, 11505, 11751, 11999, 12247, 12492, 12740, 12986, 13234, 13480, 13729, 13973, 14221, 14470, 14715, 14963, 15208, 15457, 15704, 15950, 16197, 16444, 16691, 16938, 17186, 17431, 17679, 17926, 18173, 18420, 18667]]

    def 天剑刺伤层数(self):
        return self.刺伤几率[self.等级] / 100 * self.可附加的刺伤数量[self.等级]

    def 附加倍率(self, 技能):
        if 技能 == '破军升龙击':
            return (0.40 + self.暴风式冲击波[self.等级] / 100) * self.额外倍率
        elif 技能 == '猛龙断空斩':
            return (0.21 + self.飓风[self.等级] / 1000) * self.额外倍率
        elif 技能 == '幻影剑舞斩击':
            return (0.55 + self.幻影斩击[self.等级] / 100) * self.额外倍率
        elif 技能 == '幻影剑舞剑气':
            return (0.55 + self.幻影剑气[self.等级] / 100) * self.额外倍率
        elif 技能 == '幻影剑舞钝器':
            return (0.41 + self.幻影钝器[self.等级] / 100) * self.额外倍率
        elif 技能 == '极神剑术破空斩':
            return 0.60 + self.十字斩[self.等级] / 100

    def 特殊技能加成(self, char, 武器类型):
        if self.等级 != 0:
            b = char.get_skill_by_name('破军升龙击')
            if b.等级 > 0:
                b.神剑术倍率 *= 1 + b.极神剑术占比(武器类型) * self.附加倍率('破军升龙击')

            b = char.get_skill_by_name('猛龙断空斩')
            if b.等级 > 0:
                b.神剑术倍率 *= 1 + b.极神剑术占比(武器类型) * b.旋风攻击次数 * self.附加倍率('猛龙断空斩')

            b = char.get_skill_by_name('幻影剑舞')
            if b.等级 > 0:
                k = b.极神剑术斩击占比(武器类型) * b.影子斩击次数 * self.附加倍率('幻影剑舞斩击')
                if char.武器类型 != '钝器':
                    剑气次数 = (4 if 武器类型 == '短剑' else 3)
                    k += b.极神剑术剑气占比(武器类型) * 剑气次数 * self.附加倍率('幻影剑舞剑气')
                else:
                    k += b.极神剑术剑气占比(武器类型) * 4.2 * self.附加倍率('幻影剑舞钝器')
                b.神剑术倍率 *= 1 + k

            b = char.get_skill_by_name('极神剑术破空斩')
            if b.等级 > 0:
                b.被动倍率 *= 1 + b.极神剑术占比(武器类型) * self.附加倍率('极神剑术破空斩')

            b = char.get_skill_by_name('极神剑术流星落')
            if b.等级 > 0:
                k = 3 * self.流星之天剑[self.等级] * b.流星之天剑倍率
                if 武器类型 == '太刀':
                    b.hit数 += 3
                    b.流星之天剑刺伤层数 = self.天剑刺伤层数()
                elif 武器类型 == '巨剑':
                    k *= 1 + self.巨剑流星之天剑[self.等级] / 100
                elif 武器类型 == '钝器':
                    k += 3 * 74  # 极神剑术.钝器流星之天剑[极神剑术.等级]
                elif 武器类型 == '光剑':
                    k += 3 * 74  # 极神剑术.光剑流星之天剑[极神剑术.等级]
                # 已知BUG,钝器光剑追加的额外天剑伤害极低,约只有74%
                # if self.版本 == 'GF':
                #     伤害整合 += temp / (1.2 if ('永恒不息之路[2]' in self.套装栏) else 1.0)
                # else:
                b.神剑术倍率 *= 1 + k * b.倍率 / b.等效百分比(武器类型=武器类型)

    自定义描述 = 1

    def 技能描述(self, 武器类型):
        temp = '常规技能攻击力 +%.1f%%' % (22 + 2 * self.等级) + '<br>'
        temp += '[破军升龙击]上斩：%.1f%%' % (self.附加倍率('破军升龙击') * 100) + '<br>'
        temp += '[猛龙断空斩]突进斩击：%.1f%%' % (self.附加倍率('猛龙断空斩') * 100) + '<br>'
        temp += '[幻影剑舞]斩击：%.1f%%' % (self.附加倍率('幻影剑舞斩击') * 100) + '<br>'
        if 武器类型 == '钝器':
            temp += '[幻影剑舞]钝器最后一击：%.1f%%' % (self.附加倍率('幻影剑舞钝器')
                                             * 100) + '<br>'
        else:
            temp += '[幻影剑舞]剑气：%.1f%%' % (self.附加倍率('幻影剑舞剑气') * 100) + '<br>'
        temp += '[极 · 神剑术 (破空斩)]爆炸：%.1f%%' % (self.附加倍率('极神剑术破空斩')
                                              * 100) + '<br>'
        temp += '流星之天剑攻击力：%.1f%%' % self.流星之天剑[self.等级]
        return temp


class 技能27(剑魂主动技能):
    名称 = '极神剑术瞬斩'
    所在等级 = 80
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i*1.075*(1/1.05)) for i in [0, 17099, 18832, 20565, 22301, 24034, 25770, 27507, 29240, 30976, 32708, 34443, 36176, 37912, 39646, 41382, 43115, 44848, 46584, 48320, 50054, 51788, 53523, 55256, 56992, 58727, 60465, 62195, 63931, 65664, 67400, 69135, 70869, 72604, 74338, 76073,
                              77806, 79545, 81275, 83012, 84745, 86481, 88213, 89951, 91684, 93417, 95152, 96887, 98620, 100356, 102093, 103827, 105562, 107296, 109029, 110764, 112498, 114233, 115967, 117701, 119436, 121170, 122906, 124642, 126374, 128109, 129845, 131578, 133315, 135048, 136782]]
    hit0 = 1
    data1 = [int(i*1.075*(1/1.05)) for i in [0, 2798, 3082, 3361, 3648, 3932, 4216, 4499, 4784, 5067, 5350, 5634, 5919, 6204, 6487, 6771, 7055, 7338, 7622, 7905, 8190, 8475, 8757, 9039, 9327, 9611, 9893, 10177, 10462, 10746, 11029, 11313, 11595, 11879, 12162, 12447,
                              12732, 13013, 13300, 13583, 13866, 14151, 14434, 14719, 15003, 15284, 15570, 15855, 16134, 16421, 16706, 16990, 17274, 17557, 17840, 18124, 18407, 18690, 18976, 19262, 19542, 19826, 20109, 20395, 20679, 20962, 21248, 21532, 21813, 22098, 22382]]
    hit1 = 5
    data2 = [int(i*1.075*(1/1.05)) for i in [0, 46629, 51360, 56091, 60821, 65552, 70284, 75014, 79745, 84475, 89205, 93937, 98667, 103396, 108127, 112860, 117590, 122319, 127049, 131781, 136514, 141244, 145974, 150704, 155435, 160167, 164894, 169627, 174356, 179089, 183819, 188551, 193281, 198011, 202743,
                              207473, 212202, 216933, 221663, 226394, 231127, 235856, 240587, 245319, 250047, 254779, 259510, 264241, 268969, 273703, 278432, 283161, 287890, 292623, 297353, 302085, 306815, 311545, 316276, 321008, 325740, 330468, 335198, 339929, 344660, 349390, 354122, 358852, 363584, 368315, 373044]]
    hit2 = 1
    CD = 50.0
    hit数 = 7
    是否有护石 = 1

    MP = [800, 6000]
    无色消耗 = 5

    def 装备护石(self):
        self.倍率 *= 1.32


class 技能28(剑魂主动技能):
    名称 = '万剑归宗'
    所在等级 = 85
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    # 该技能hit数不会触发太刀刺伤
    # 终结
    data0 = [int(i*1.077*(1/1.05)) for i in [0, 5987, 7381, 8772, 10157, 11549, 12942, 14325, 15719, 17106, 18492, 19889, 21276, 22661, 24049, 25444, 26832, 28219, 29606, 31004, 32389, 33775, 35168, 36554, 37947, 39338, 40727, 42112, 43509, 44895, 46281, 47666, 49066, 50449, 51837,
                              53227, 54616, 56010, 57395, 58789, 60174, 61565, 62958, 64345, 65729, 67117, 68513, 69901, 71287, 72675, 74072, 75460, 76845, 78235, 79628, 81014, 82407, 83791, 85181, 86576, 87963, 89350, 90734, 92132, 93522, 94904, 96295, 97691, 99078, 100463, 101857]]
    hit0 = 14
    data1 = [int(i*1.077*(1/1.05)) for i in [0, 23931, 29483, 35036, 40588, 46128, 51682, 57234, 62788, 68332, 73886, 79437, 84989, 90531, 96082, 101637, 107187, 112736, 118288, 123840, 129382, 134933, 140486, 146038, 151590, 157135, 162687, 168237, 173781, 179336, 184887, 190438, 195989, 201537, 207087,
                              212638, 218185, 223736, 229289, 234840, 240392, 245935, 251487, 257039, 262587, 268138, 273688, 279240, 284785, 290336, 295888, 301440, 306986, 312538, 318089, 323635, 329187, 334739, 340290, 345842, 351388, 356939, 362490, 368035, 373587, 379137, 384689, 390243, 395788, 401343, 406888]]
    hit1 = 2
    # 穿云刺
    data2 = [int(i*1.077*(1/1.05)) for i in [0, 1293, 1592, 1893, 2192, 2489, 2788, 3091, 3390, 3689, 3990, 4288, 4587, 4887, 5187, 5488, 5786, 6086, 6385, 6685, 6985, 7284, 7584, 7885, 8184, 8484, 8782, 9080, 9381, 9680, 9982, 10280, 10580, 10881, 11180, 11478,
                              11779, 12080, 12379, 12677, 12977, 13278, 13577, 13875, 14177, 14475, 14774, 15076, 15376, 15675, 15973, 16273, 16573, 16872, 17172, 17473, 17771, 18072, 18371, 18671, 18968, 19267, 19569, 19869, 20168, 20470, 20767, 21066, 21368, 21666, 21966]]
    hit2 = 1
    CD = 180.0

    MP = [2500, 5000]
    无色消耗 = 10

    形态 = ['终结', '穿云']

    def 形态变更(self, 形态, char: Character):
        if 形态 == '' and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "终结":
            self.hit0 = 14
            self.hit1 = 2
            self.hit2 = 0
        elif 形态 == "穿云":
            self.hit0 = 0
            self.hit1 = 0
            self.hit2 = 1


class 技能29(被动技能):
    名称 = '无形剑意'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18 + 0.02 * self.等级, 5)

    短剑流心刺 = [int(i) for i in [0, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90,
                              93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147]]
    短剑流心刺空中 = [int(i) for i in [0, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 31, 32, 33, 35, 36,
                                37, 39, 40, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 64, 65]]
    太刀流心跃 = [int(i) for i in [0, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 11, 11, 12,
                              12, 12, 13, 13, 14, 14, 14, 15, 15, 16, 16, 16, 17, 17, 18, 18, 18, 19, 19, 20]]
    太刀流心升 = [int(i) for i in [0, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 34,
                              35, 36, 37, 38, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 58, 59]]
    钝器流心刺 = [int(i) for i in [0, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145,
                              150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245]]
    巨剑流心刺下斩 = [int(i) for i in [0, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
                                129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149]]
    巨剑流心刺旋风 = [int(i) for i in [0, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45,
                                47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87]]
    巨剑流心刺空中 = [int(i) for i in [0, 240, 244, 248, 252, 256, 260, 264, 268, 272, 276, 280, 284, 288, 292, 296, 300, 304, 308, 312,
                                316, 320, 324, 328, 332, 336, 340, 344, 348, 352, 356, 360, 364, 368, 372, 376, 380, 384, 388, 392, 396]]
    光剑流心升 = [int(i) for i in [0, 48, 53, 58, 62, 67, 72, 77, 82, 86, 91, 96, 101, 106, 110, 115, 120, 125, 130, 134, 139,
                              144, 149, 154, 158, 163, 168, 173, 178, 182, 187, 192, 197, 202, 206, 211, 216, 221, 226, 230, 235]]

    自定义描述 = 1

    def 特殊技能加成(self, char, 武器类型):
        if self.等级 > 0:
            基础倍率 = self.加成倍率(武器类型)

            if 武器类型 == '短剑':
                流心刺 = char.get_skill_by_name('流心刺')
                流心刺.地面被动倍率['短剑'] = (
                    1 + 2 * (self.短剑流心刺[self.等级] / 100) / 3) / 基础倍率  # 地面2 + 1段
                流心刺.空中被动倍率['短剑'] = (
                    1 + 3 * (self.短剑流心刺空中[self.等级] / 100) / 2) / 基础倍率  # 空中2段

            elif 武器类型 == '太刀':
                流心跃 = char.get_skill_by_name('流心跃')
                流心升 = char.get_skill_by_name('流心升')

                流心跃.hit数 += 5
                流心跃.被动倍率 *= (
                    1 + (self.太刀流心跃[self.等级] / 100) * 5 / (2 * 0.5)) / 基础倍率

                流心升.hit数 += 4
                流心升.被动倍率 *= (
                    1 + 4 * (self.太刀流心升[self.等级] / 100) / (3 * 0.8)) / 基础倍率

            elif 武器类型 == '钝器':
                流心刺 = char.get_skill_by_name('流心刺')
                流心刺.被动倍率 *= (
                    1 + (self.钝器流心刺[self.等级] / 100) / (2 * 1.25)) / 基础倍率

            elif 武器类型 == '巨剑':
                流心刺 = char.get_skill_by_name('流心刺')
                # 基础：地面2 + 1段  加成后：地面1段(200%伤害) + 下斩1段 + 旋风3段
                流心刺.地面被动倍率['巨剑'] = (((2 + 1) * (self.巨剑流心刺下斩[self.等级] / 100) +
                                     (self.巨剑流心刺旋风[self.等级] / 100) * 3) / (2 + 1)) / 基础倍率
                流心刺.空中被动倍率['巨剑'] = (
                    (self.巨剑流心刺空中[self.等级] / 100) / 2) / 基础倍率  # 空中1段，伤害为200%

            elif 武器类型 == '光剑':
                流心升 = char.get_skill_by_name('流心升')
                流心升.被动倍率 *= (1 +
                             (self.光剑流心升[self.等级] / 100) / (3 * 0.8)) / 基础倍率

    def 技能描述(self, 武器类型):
        temp = '常规技能攻击力 +%.1f%%' % (18 + 2 * self.等级) + '<br>'
        if 武器类型 == '短剑':
            temp += '短剑流心刺：%.1f%%' % self.短剑流心刺[self.等级] + '<br>'
            temp += '短剑流心刺空中：%.1f%%' % self.短剑流心刺空中[self.等级] + ' i 3'
        elif 武器类型 == '太刀':
            temp += '太刀流心跃：%.1f%%' % self.太刀流心跃[self.等级] + ' i 5<br>'
            temp += '太刀流心升：%.1f%%' % self.太刀流心升[self.等级] + ' i 4'
        elif 武器类型 == '钝器':
            temp += '钝器流心刺：%.1f%%' % self.钝器流心刺[self.等级]
        elif 武器类型 == '巨剑':
            temp += '巨剑流心刺下斩：%.1f%%' % self.巨剑流心刺下斩[self.等级] + '<br>'
            temp += '巨剑流心刺旋风：%.1f%%' % self.巨剑流心刺旋风[self.等级] + ' i 3<br>'
            temp += '巨剑流心刺空中：%.1f%%' % self.巨剑流心刺空中[self.等级]
        elif 武器类型 == '光剑':
            temp += '光剑流心升：%.1f%%' % self.光剑流心升[self.等级]
        return temp


class 技能30(剑魂主动技能):
    名称 = '极神剑术无形斩'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i*1.082*(1/1.05)) for i in [0, 25440, 28021, 30602, 33183, 35765, 38346, 40926, 43507, 46089, 48669, 51250, 53831, 56411, 58994, 61575, 64155, 66736, 69317, 71898,
                              74479, 77060, 79641, 82221, 84804, 87385, 89965, 92546, 95127, 97708, 100289, 102870, 105450, 108032, 110614, 113194, 115775, 118356, 120936, 123517, 126099]]
    hit0 = 1
    data1 = [int(i*1.082*(1/1.05)) for i in [0, 3634, 4003, 4371, 4740, 5108, 5477, 5846, 6215, 6584, 6953, 7322, 7690, 8058, 8427, 8796, 9164, 9533, 9902, 10271, 10638,
                              11007, 11376, 11745, 12114, 12483, 12852, 13221, 13590, 13957, 14326, 14695, 15064, 15433, 15802, 16171, 16540, 16908, 17275, 17644, 18013]]
    hit1 = 13
    data2 = [int(i*1.082*(1/1.05)) for i in [0, 48458, 53374, 58291, 63207, 68123, 73039, 77955, 82871, 87787, 92703, 97621, 102537, 107453, 112369, 117285, 122201, 127118, 132034, 136950,
                              141866, 146782, 151698, 156614, 161530, 166447, 171362, 176278, 181194, 186110, 191026, 195943, 200860, 205776, 210692, 215608, 220524, 225440, 230356, 235272, 240189]]
    hit2 = 1
    hit数 = 15
    CD = 60.0

    MP = [960, 7200]
    无色消耗 = 7


class 技能31(剑魂主动技能):
    名称 = '万剑极诣开天斩'
    所在等级 = 100
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    data0 = [int(i*1.072*(1/1.05)) for i in [0, 57463, 70790, 84114, 97440, 110763, 124088, 137413, 150738, 164063, 177389, 190712, 204038, 217362, 230687, 244013, 257338, 270663, 283989, 297314,
                              310637, 323963, 337287, 350613, 363937, 377263, 390588, 403912, 417237, 430563, 443887, 457212, 470537, 483863, 497184, 510510, 523835, 537160, 550487, 563812, 577136]]
    hit0 = 1
    data1 = [int(i*1.072*(1/1.05)) for i in [0, 75144, 92569, 109994, 127421, 144845, 162268, 179693, 197118, 214544, 231969, 249394, 266819, 284244, 301669, 319093, 336518, 353944, 371369, 388795,
                              406219, 423644, 441069, 458495, 475919, 493343, 510768, 528193, 545618, 563043, 580468, 597891, 615319, 632743, 650167, 667594, 685018, 702442, 719869, 737292, 754715]]
    hit1 = 1
    data2 = [int(i*1.072*(1/1.05)) for i in [0, 10314, 12704, 15098, 17487, 19880, 22271, 24663, 27056, 29447, 31839, 34230, 36622, 39013, 41405, 43797, 46188, 48580, 50971,
                              53364, 55754, 58146, 60538, 62931, 65320, 67714, 70105, 72496, 74888, 77281, 79670, 82061, 84453, 86844, 89236, 91630, 94023, 96413, 98806, 101196, 103586]]
    hit2 = 6
    data3 = [int(i*1.072*(1/1.05)) for i in [0, 14144, 17424, 20704, 23985, 27265, 30544, 33826, 37104, 40384, 43665, 46944, 50225, 53505, 56782, 60063, 63344, 66624, 69904, 73184,
                              76464, 79744, 83024, 86303, 89583, 92864, 96144, 99424, 102705, 105984, 109265, 112544, 115822, 119105, 122383, 125661, 128945, 132222, 135502, 138785, 142063]]
    hit3 = 5
    data4 = [int(i*1.072*(1/1.05)) for i in [0, 176812, 217812, 258812, 299810, 340812, 381812, 422811, 463811, 504810, 545810, 586810, 627811, 668811, 709810, 750810, 791810, 832810, 873810, 914809, 955810,
                              996810, 1037810, 1078810, 1119810, 1160809, 1201809, 1242810, 1283810, 1324810, 1365809, 1406808, 1447809, 1488809, 1529808, 1570810, 1611809, 1652808, 1693810, 1734809, 1775806]]
    hit4 = 1
    hit数 = 14
    CD = 290.0

    MP = [4028, 8056]
    无色消耗 = 15


class classChange(Character):
    def __init__(self):
        self.实际名称 = 'weapon_master'
        self.名称 = '极诣·剑魂'
        self.角色 = '鬼剑士(男)'
        self.类型 = '输出'
        self.职业 = '剑魂'
        self.武器选项 = ['光剑', '太刀', '钝器', '巨剑', '短剑']
        self.输出类型选项 = ['物理百分比']
        self.防具精通属性 = ['力量']
        self.类型 = '物理百分比'
        self.武器类型 = '光剑'
        self.防具类型 = '轻甲'
        self.get_skill_by_name
        技能列表 = []
        技能序号 = {}
        i = 0
        while i >= 0:
            try:
                tem = eval('技能'+str(i)+'()')
                tem.基础等级计算()
                技能序号[tem.名称] = i
                技能列表.append(tem)
                i += 1
            except:
                i = -1
        self.技能栏 = 技能列表
        self.技能序号 = 技能序号
        self.buff = 1.82

        super().__init__()

    def 被动倍率计算(self):
        # 武器奥义、精通相关
        武器奥义 = self.get_skill_by_name('武器奥义')
        if 武器奥义.等级 != 0:
            for i in ['太刀精通', '短剑精通', '巨剑精通', '光剑精通', '钝器精通']:
                if self.get_skill_by_name(i).等级 != 0:
                    self.get_skill_by_name(i).等级 += (武器奥义.等级 + 1)
                if self.武器类型 not in i:
                    self.get_skill_by_name(i).关联技能 = ['无']

        super().被动倍率计算()

        # 无形剑意流系技能
        无形剑意 = self.get_skill_by_name('无形剑意')
        无形剑意.特殊技能加成(self, self.武器类型)

        # 极神剑术相关
        极神剑术 = self.get_skill_by_name('极神剑术')
        极神剑术.特殊技能加成(self, self.武器类型)

        # 里鬼剑术附加
        里鬼剑术 = self.get_skill_by_name('里鬼剑术')
        里鬼剑术.特殊技能加成(self, self.武器类型)

    def 伤害计算(self):
        data = super().伤害计算()
        skill_dict = data['skills']

        神剑术伤害 = 0
        count = 0
        attack_rate = 0

        # region 神剑术

        for skill in ['破军升龙击', '猛龙断空斩', '幻影剑舞', '极神剑术流星落']:
            if skill in skill_dict.keys():
                temp = self.get_skill_by_name(skill)
                count += skill_dict[skill]['count']
                神剑术伤害 += skill_dict[skill]['damage']*(temp.神剑术倍率-1)
                attack_rate = (
                    attack_rate + skill_dict[skill]['atk_rate']*skill_dict[skill]['count']*(temp.神剑术倍率-1))/count

        if 神剑术伤害 > 0:
            神剑术 = self.get_skill_by_name('极神剑术')
            data['skills']['极神剑术'] = {
                'name': '极神剑术',
                'rate': 1.0,
                'cd': 1.0,
                'mp': 0,
                'damage': 神剑术伤害,
                'count': count,
                'level': 神剑术.等级,
                'cosume_cube_frag': 0,
                'cd_o': 1.0,
                'atk_rate': attack_rate
            }
            data['total_data'] += 神剑术伤害

        # endregion

        # region 太刀刺伤
        if self.武器类型 == '太刀':
            b = self.get_skill_by_name("太刀精通")
            if b.等级 > 0:
                总hit = 0
                for key in data['skills'].keys():
                    d = data['skills'][key]
                    i = self.get_skill_by_name(d['name'])
                    if i.是否主动 == 1:
                        释放次数 = d['count']
                        总hit += i.hit数 * 释放次数
                        b.刺伤层数 += i.额外刺伤层数(self.武器类型) * 释放次数

                b.刺伤层数 += 总hit * b.刺伤概率(self.武器类型)

                被动倍率 = 1.0
                for name in ['光剑精通', '短剑精通', '巨剑精通', '太刀精通', '钝器精通', '无我剑气', '极鬼剑术斩铁式', '无形剑意']:
                    被动倍率 *= self.get_skill_by_name(name).加成倍率(self.武器类型)

                倍率 = b.刺伤百分比(self.武器类型) * 被动倍率

                count = round(b.刺伤层数 / 17, 1)
                damage = 倍率 * self.伤害指数 * (self.伤害比例.get("直伤", 0.0)) / 100
                for item in ['中毒', '灼烧', '感电', '出血']:
                    系数 = self.伤害系数.get(item, 0.0)
                    # 出血 叠层 1层1%出血伤害 满10%
                    if item == '出血':
                        系数 *= 1.1
                    # 直伤转换的异常处理：直伤伤害*异常比例*异常系数
                    damage += 倍率 * self.伤害指数 * \
                        (self.伤害比例.get(item, 0.0) * 系数) / 100
                data['skills']['太刀精通'] = {
                    'name': '太刀精通',
                    'rate': 被动倍率,
                    'cd': 0,
                    'mp': 0,
                    'damage': damage,
                    'count': count,
                    'level': b.等级,
                    'cosume_cube_frag': 0,
                    'cd_o': 0,
                    'atk_rate': b.刺伤浮动
                }
            data['total_data'] += damage
        # endregion

        dps = 0
        for temp in data['skills']:
            skill = data['skills'][temp]
            try:
                dps += (skill['damage']/skill['count'])/skill['cd']
            except:
                pass
        data['dps'] = dps
        return data

        # 神影手
        '''
        if self.技能栏[self.技能序号['拔刀斩']].触发神影手 == 1 and 技能总伤害[self.技能序号['拔刀斩']] != 0:

            技能释放次数[self.技能序号['神影手']] = 技能释放次数[self.技能序号['拔刀斩']]

            神影手倍率 = 1.0

            for name in ['光剑精通', '短剑精通', '巨剑精通', '太刀精通', '钝器精通']:
                神影手倍率 *= self.技能栏[self.技能序号[name]].加成倍率(self.武器类型)

            比例 = self.技能栏[self.技能序号['神影手']].百分比 * self.伤害指数 * \
                神影手倍率 / self.主BUFF / 技能单次伤害[self.技能序号['拔刀斩']]

            技能总伤害[self.技能序号['神影手']] = 比例 * 技能总伤害[self.技能序号['拔刀斩']]
        '''

    def 技能倍率加成(self, min: int, max: int, x: float, exc=[int], type="all") -> None:
        for i in self.技能栏:
            if i.所在等级 >= min and i.所在等级 <= max and i.所在等级 not in exc:
                if i.是否有伤害 == 1:
                    if type == "all" or (type == "active" and i.是否主动 == 1):
                        i.倍率 *= (1 + x * self.技能伤害增加增幅)
                if type == "all" and min == max == 75 and i.名称 == '极神剑术':
                    i.额外倍率 *= (1 + x * self.技能伤害增加增幅)

    def set_skill_info(self, info, rune_except=[], clothes_pants=[]):
        super().set_skill_info(info, clothes_pants=[
            '太刀精通', '短剑精通', '巨剑精通', '钝器精通'])

    def 技能等级加成(self, 加成类型: str, min: int, max: int, lv: int, exc=[int]) -> None:
        for i in self.技能栏:
            if i.所在等级 >= min and i.所在等级 <= max and i.所在等级 not in exc and i.名称 not in ['太刀精通', '巨剑精通', '短剑精通', '钝器精通']:
                if 加成类型 == '所有':
                    i.等级加成(lv, char=self)
                else:
                    if i.是否主动 == 1:
                        i.等级加成(lv, char=self)
        # super().技能等级加成(加成类型, min, max, lv, exc)
